package com.fanbuchi.app.ins.net;

import com.squareup.okhttp.Response;
import com.squareup.okhttp.ResponseBody;
import com.squareup.okhttp.ws.WebSocket;
import com.squareup.okhttp.ws.WebSocketListener;

import java.io.IOException;

import okio.Buffer;

/**
 * Created by win7 on 2016/6/6.
 */
public abstract class BaseWebSocketListener implements WebSocketListener {
   /* @Override
    public void onOpen(WebSocket webSocket, Response response) {

    }*/

    @Override
    public void onFailure(IOException e, Response response) {
        //retry conn
    }

    /*@Override
    public void onMessage(ResponseBody message) throws IOException {

    }*/

    @Override
    public void onPong(Buffer payload) {
        //ping
    }

    @Override
    public void onClose(int code, String reason) {
        //close conn
    }
}
